﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Inovout.Descriptors
{
    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
    public class ControlPartAttribute : AliasAttribute
    {

        public ControlPartAttribute(string caption, bool isRequired, int maxValue)
            : this(caption,ControlType.Text,isRequired,maxValue)
        {
        }
        public ControlType ControlType { get; private set; }
        public bool IsRequired { get; private set; }
        public object MaxValue { get; private set; }
        public object MinValue { get; private set; }

        public ControlPartAttribute(string caption, ControlType controlType, bool isRequired, int maxValue)
            : base(caption)
        {
            ControlType = controlType;
            IsRequired = isRequired;
            MaxValue = maxValue;
            MinValue = MinValue;
        }
    }
}
